package com.seanzx.dp.serializer;

import com.seanzx.dp.entity.Column;

import java.io.FilterInputStream;
import java.io.IOException;

/**
 * provides mapping of data to file storage.
 * method deserialize
 */
public interface ISerializer {
    /**
     * The deserialize method converts the file information in the InputStream into the corresponding string information by column type
     */
    String deserialize(Column column, FilterInputStream inputStream) throws IOException;

    /**
     * The serialize method converts the string information into a byte array information by column type
     */
    byte[] serialize(Column column, String value);
}
